package cn.hiapi.user.vo;

import cn.hiapi.basic.entity.BasicEntity;
import cn.hiapi.basic.serializer.LongToStringSerializer;
import cn.hiapi.publics.vo.ShopBaseVo;
import cn.hiapi.shop.vo.ShopBase;
import com.alibaba.fastjson.annotation.JSONField;
import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.omg.CORBA.PRIVATE_MEMBER;

import javax.persistence.Column;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author AdinZ
 * @date 2022/12/31 15:27
 */
@Setter
@Getter
public class GroupShareVo extends BasicEntity {
    @JSONField(serializeUsing = LongToStringSerializer.class)
    private Long id;
    @ApiModelProperty("商品名称")
    private String title;
    @ApiModelProperty("商品图片")
    private String thumb;
    @ApiModelProperty("团购价格")
    @Column(columnDefinition = "decimal(10,2)")
    private BigDecimal price = BigDecimal.ZERO;
    @ApiModelProperty("成团人数")
    private int groupNum;
    @ApiModelProperty("团购状态,0 等待团长支付,1待成团,2已成团,3成团失败")
    private int status;
    @ApiModelProperty("团购到期时间")
    private long expire;
    @ApiModelProperty("创建时间")
    private long created = System.currentTimeMillis();

    @ApiModelProperty("团长")
    private Object buyer;

    @ApiModelProperty("参团人员")
    private List items = Lists.newArrayList();

    @ApiModelProperty("开始时间")
    private long startTime;
    @ApiModelProperty("结束时间")
    private long endTime;

    @ApiModelProperty("使用开始时间")
    private long useStart;
    @ApiModelProperty("使用结束时间")
    private long useEnd;
    @ApiModelProperty("活动id")
    private long aid;

    @ApiModelProperty("原价")
    private BigDecimal costPrice = BigDecimal.ZERO;

    private ShopBaseVo shop;


}
